package sz.szsmk.citizencard.widget;

import android.content.Context;
import android.view.View;
import android.widget.TextView;

import sz.szsmk.citizencard.R;
 
/**
 * Copyright (c)2019
 * author: zdh
 * created on: 2019/3/1 11:00
 * description:
 */
public class TransMarkUtils {


    public static void setTransMark(String siteTv, TextView markTv, int currentLine, Context context) {

        if (siteTv.equals("广济南路")) {
            markTv.setVisibility(View.VISIBLE);
            if (currentLine == 2) {
                markTv.setText("1");
                markTv.setBackground(context.getResources().getDrawable(R.drawable.circle_subway_one));
            } else {
                markTv.setText("2");
                markTv.setBackground(context.getResources().getDrawable(R.drawable.circle_subway_two));
            }
        }
        if (siteTv.equals("乐桥")) {
            markTv.setVisibility(View.VISIBLE);
            if (currentLine == 1) {
                markTv.setText("4");
                markTv.setBackground(context.getResources().getDrawable(R.drawable.circle_subway_four));
            } else {
                markTv.setText("1");
                markTv.setBackground(context.getResources().getDrawable(R.drawable.circle_subway_one));
            }
        }

        if (siteTv.equals("苏州火车站") || siteTv.equals("石湖东路")) {
            markTv.setVisibility(View.VISIBLE);
            if (currentLine == 2) {
                markTv.setText("4");
                markTv.setBackground(context.getResources().getDrawable(R.drawable.circle_subway_four));
            } else {
                markTv.setText("2");
                markTv.setBackground(context.getResources().getDrawable(R.drawable.circle_subway_two));
            }
        }
        if (siteTv.equals("红庄")) {
            markTv.setVisibility(View.VISIBLE);
            if (currentLine == 4) {
                markTv.setText("4");
                markTv.setBackground(context.getResources().getDrawable(R.drawable.circle_subway_four));
            } else {
                markTv.setText("4");
                markTv.setBackground(context.getResources().getDrawable(R.drawable.circle_subway_four));
            }
        }

        if(siteTv.equals("狮子山")){
            markTv.setVisibility(View.VISIBLE);
            if (currentLine == 3) {
                markTv.setText("1");
                markTv.setBackground(context.getResources().getDrawable(R.drawable.circle_subway_one));
            }else{
                markTv.setText("3");
                markTv.setBackground(context.getResources().getDrawable(R.drawable.circle_subway_three));
            }
        }

        if(siteTv.equals("盘蠡路")){
            markTv.setVisibility(View.VISIBLE);
            if (currentLine == 3) {
                markTv.setText("2");
                markTv.setBackground(context.getResources().getDrawable(R.drawable.circle_subway_two));
            }else{
                markTv.setText("3");
                markTv.setBackground(context.getResources().getDrawable(R.drawable.circle_subway_three));
            }
        }

        if(siteTv.equals("宝带路")){
            markTv.setVisibility(View.VISIBLE);
            if (currentLine == 3) {
                markTv.setText("4");
                markTv.setBackground(context.getResources().getDrawable(R.drawable.circle_subway_four));
            }else{
                markTv.setText("3");
                markTv.setBackground(context.getResources().getDrawable(R.drawable.circle_subway_three));
            }
        }

        if(siteTv.equals("东方之门")||siteTv.equals("东方之门站")){
            markTv.setVisibility(View.VISIBLE);
            if (currentLine == 3) {
                markTv.setText("1");
                markTv.setBackground(context.getResources().getDrawable(R.drawable.circle_subway_one));
            }else{
                markTv.setText("3");
                markTv.setBackground(context.getResources().getDrawable(R.drawable.circle_subway_three));
            }
        }

    }

}
